Add Match_query And Matchquery As Alternate Syntax for Match Function#163
Conversation
Signed-off-by: GabeFernandez310 <gabrielf@bitquilltech.com>
Signed-off-by: GabeFernandez310 <gabrielf@bitquilltech.com>
Signed-off-by: GabeFernandez310 <gabrielf@bitquilltech.com>
Signed-off-by: GabeFernandez310 <gabrielf@bitquilltech.com>
Codecov Report
@@ Coverage Diff @@
## integ-add-legacy-syntax-for-match-function #163 +/- ##
================================================================================
- Coverage 98.27% 95.71% -2.57%
Complexity 3351 3351
================================================================================
Files 327 337 +10
Lines 8457 9117 +660
Branches 553 672 +119
================================================================================
+ Hits 8311 8726 +415
- Misses 142 334 +192
- Partials 4 57 +53
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
@GabeFernandez310 can you add an example for new syntax please? This will help the verifier. |
...src/test/java/org/opensearch/sql/opensearch/storage/script/filter/lucene/MatchQueryTest.java
Outdated
Show resolved
Hide resolved
docs/user/dql/functions.rst
Outdated
|
|
||
| ``match(field_expression, query_expression[, option=<option_value>]*)`` | ||
|
|
||
| The match function maps to the match query used in search engine, to return the documents that match a provided text, number, date or boolean value with a given field. This is alternate syntax for the `match`_ function. Available parameters include: |
There was a problem hiding this comment.
Please mention that this was added for backwards compatibility. See the match_phrase section:
https://github.com/Bit-Quill/opensearch-project-sql/blob/726ddbd006cfbb9c7e9f19231e5706f48de5e6ee/docs/user/dql/functions.rst#match-phrase
There was a problem hiding this comment.
Same comment here as above for matchquery
There was a problem hiding this comment.
just add a sentence like:
For backward compatibility, matchphrase is also supported and mapped to match_phrase query as well.
but using matchquery and match_query
MaxKsyunz
left a comment
There was a problem hiding this comment.
Please make sure SQL Java CI workflow passes.
Looks to be failing on checkstyle.
Signed-off-by: GabeFernandez310 <gabrielf@bitquilltech.com>
Yury-Fridlyand
left a comment
There was a problem hiding this comment.
Can you add an IT which runs match_query, match and matchquery and compares results?
Something like:
var result1 = executeQuery(...);
var result2 = executeQuery(...);
assertTrue(result1.similar(result2));
...src/test/java/org/opensearch/sql/opensearch/storage/script/filter/lucene/MatchQueryTest.java
Outdated
Show resolved
Hide resolved
...src/test/java/org/opensearch/sql/opensearch/storage/script/filter/lucene/MatchQueryTest.java
Show resolved
Hide resolved
Signed-off-by: GabeFernandez310 <gabrielf@bitquilltech.com>
Signed-off-by: GabeFernandez310 <gabrielf@bitquilltech.com>
Remove usage of deprecated BaseNodeRequest Signed-off-by: Vijayan Balasubramanian <balasvij@amazon.com>
Description
Adds
match_queryandmatchqueryas alternate syntax formatchfunction which currently exists in opensearchQueries can be performed using the following syntax :
Example:
These queries should return the same result as
match(field, 'query')Issues Resolved
AOS-765
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.